const {testsModel} = require('../models/testsModels');
const {otherModel} = require('../models/otherModel');


async function getTests(req, res, next) {
    const {TypeId} = req.query;
    // console.log(TypeId);
    const result = await testsModel.find({TypeId}).populate('TypeId').populate('KnowledgePointId')
    console.log(result);
    if(result.lenght>0){
        res.send({
            code:'200',
            result   
           })
    }

  }
async function getOneTests(req, res, next){
    const result = await otherModel.find()
    console.log(result)
}
module.exports = {
    getTests,
    getOneTests
}